//
//  MKCollectionCellModel.h
//  MKUI
//
//  Created by sushangjin on 14/11/19.
//  Copyright © 2020 sushangjin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "MKCollectionModelObjectBase.h"
NS_ASSUME_NONNULL_BEGIN

@class MKCollectionSectionModel,MKCollectionModel;

@interface MKCollectionCellModel : MKCollectionModelObjectBase{
	@protected
	__weak MKCollectionSectionModel *_sectionModel;
}
@property(nonatomic,readonly,nullable) __kindof MKCollectionModel *collectionModel;//集合模型对象
@property(nonatomic,strong,nullable) id userInfo;//自定义的扩展对象
@property(nonatomic,assign) BOOL selected;
@property(nonatomic,assign) BOOL focused;//是否获取焦点
@property(nonatomic,readonly) NSInteger indexInSectionModel;
@property(nonatomic,readonly,nullable) NSIndexPath *indexPathInModel;
@property(nonatomic,readonly,nullable) NSIndexPath *indexPathOfPreCell;//上一个单元格的indexpath
@property(nonatomic,readonly,nullable) NSIndexPath *indexPathOfNextCell;//下一个单元格的indexpath
//是否是整个model中第一个元素
@property(nonatomic,readonly) BOOL isFirstInAllCellModels;
//是否是整个model中最后一个元素
@property(nonatomic,readonly) BOOL isLastInAllCellModels;
//弱引用上層的分组對象
- (void)setSectionModel:(nullable MKCollectionSectionModel *)sectionModel;
- (nullable __kindof MKCollectionSectionModel *)sectionModel;

- (NSComparisonResult)compare:(MKCollectionCellModel *)otherObject;
@end
NS_ASSUME_NONNULL_END
